﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DecoratorModel
{
    public class ConcreteDecortor_AddAmount : Decorator_News
    {
        public string AddAmount()
        {
            //新闻人气加一
            Console.WriteLine("新闻人气已经加一");
            return "新闻人气已经加一";

        }
        public ConcreteDecortor_AddAmount(Component_News _Component_News)
            : base(_Component_News)
        {


        }
        /// <summary>
        /// 重写父类中读取新闻的方法
        /// </summary>
        /// <returns></returns>
        public override List<News> getListOfNews()
        {
            //此处加入扩展代码:新闻人气加一
            AddAmount();
            return base.getListOfNews();

        }
    }
}
